<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%><!DOCTYPE html>
<html>
<head>
<title>regist</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="../css/regist-style.css" rel='stylesheet' type='text/css' />
<!--//webfonts-->
<style type="text/css">
.info {
	float: left;
	width: 50%;
}

.font {
	width: 50px;
}
td{
font-size: 14px;
margin-top:10px;
margin: 5px;
margin-left: 10px;
top: 10px;
}
tr{
top: 10px;
margin:10px;
}
</style>

<script type="text/javascript">
function checkUserInfo() {
	var Email =document.getElementById("Email");
	var adminName =document.getElementById("adminName");
	var pwd = document.getElementById("pwd");
	var rePwd = document.getElementById("rePwd");
	if(Email.value=="" ) {
		alert("Email不能为空");
		return false;
	}else{
	var emailReg= /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;
	if(!emailReg.test(Email.value) ){ 
		alert("您输入的Email地址格式不正确！"); 
		return false; 
	}
	}
	if(adminName.value=="" ) {
		alert("昵称不能为空");
		return false;
	}
	if(pwd.value=="" ) {
		alert("密码为空");
		return false;
	}
	if(pwd.value!=rePwd.value  ) {
		alert("密码与确认密码不一致");
		return false;
	}
}
</script>
</head>
<body>
	<!-----start-main---->
	<div class="main">
		<div class="regist-form">
			<h1>人事档案管理系统用户注册</h1>
			<div class="head" style="top: -15%;left: 45%;">
				<img src="../images/user.png" alt="" />
			</div>
			<form action="adminAdd" name="adminadd" method="post" onsubmit="return checkUserInfo()" >
				<div style="font-size: 18px;"></div>
				<div style="height: 20px;"></div>
				<div style="font-size: 14px;">
					email: <input type="text" name="admin.email" id ="Email"/>
					<span style="color: red;">*</span>
				</div>
				<div style="font-size: 14px;">
					昵&nbsp;称: <input type="text" name="admin.adminName" id ="adminName"/>
					<span style="color: red;">*</span>
				</div>
				<div style="font-size: 14px;">
					密&nbsp;码: <input type="password" name="admin.pwd" id = "pwd"/>
					<span style="color: red;">*</span>
				</div>
				<div style="font-size: 14px;">
					确认密码:<input type="password" name="rePwd" id = "rePwd"/>
				</div>
				<div style="height: 30px;"></div>
				<div><p style="color: red">${message}</p></div>
				<div>
					<input type="submit" value="提交">
					<input type="reset" value="重置">
				</div>
			</form>
		</div>
		<!--//End-login-form-->
		<!-----start-copyright---->
		<div class="copy-right">
			<p>
				版权所有 <a href="http://w3layouts.com">WYQ</a>
			</p>
		</div>
		<!-----//end-copyright---->
	</div>
	<!-----//end-main---->

</body>
</html>